import request from "@/config/request.js";


export function getToken(data) {
	return request.get(`/gwsj/token`);
}

export function getCodImg(data) {
	return request.post(`/gwsj/codeImg`, data);
}

export function getPhone(data) {
	return request.post(`/gwsj/getPhone`, data);
}

export function getOpenid(code) {
	return request.get(`/gwsj/getOpenid`, {
		code
	});
}

//登录注册
export function login(data) {
	return request.post(`/gwsj/login`, data);
}

//获取用户信息
export function getUserInfo(data) {
	return request.get(`/gwsj/userInfo`, data);
}

//修改用户信息
export function editUserInfo(data) {
	return request.put(`/gwsj/userInfo`, data);
}

/**
 * 获取直传参数
 *  
 */
export function uploadOssFiles(imageType) {
	return request.get(`/tenant/common/get_oss_info/${imageType}`, {
		httpType: 'tenant'
	});
}

/**
 * 获取直传参数
 *  
 */
export function uploadFiles(file) {
	return request.post(`/tenant/common/image/post`, {
		httpType: 'tenant',
		file
	});
}